package TG_125;

public class Solution {
	public boolean isPalindrome(String s) {
		StringBuilder str = new StringBuilder();
		for (int i = 0; i < s.length(); i++) {
			if (Character.isLetterOrDigit(s.charAt(i))) {
				str.append(Character.toLowerCase(s.charAt(i)));
			}
		}

		StringBuilder re = new StringBuilder(str).reverse();
	
		return str.toString().equals(re.toString());
	}
}
